<?php

namespace App\Models\Logs;

use App\Models\System\User;
use App\Traits\ModelTrait;
use Illuminate\Database\Eloquent\Model;

class LoginLog extends Model
{
    use ModelTrait;
    protected $table = 'users_login_log';
    protected $fillable = [
        'user_id', 'username', 'message', 'platform', 'browser', 'ip', 'ip_address', 'user_agent'
    ];

    public function user()
    {
        return $this->hasOne(User::class, 'id', 'user_id');
    }
}
